<template>
  <div>
    <h1>develop_dashboard主页</h1>
    <div>
      <el-button type="primary" v-hasPermi="['chemicalndustry:view2:add']" @click="addDemo">新增</el-button>
      <el-button type="primary">修改</el-button>
      <el-button type="primary">删除</el-button>
    </div>
    <h2>接口数据：{{demo}}</h2>
  </div>

</template>
<script>
    import {getInfo} from '../api/article.js'
    import {getToken} from '../utils/auth.js'
  export default {
    data() {
      return {
        demo:[]
      }
    },
    mounted() {
      this.addDemo()
    },
    methods: {
      addDemo() {
          getInfo(getToken()).then(res => {
            console.log(res)
            this.demo = res.roles[0];
          })
      },
    },

  }
</script>
<style lang="scss" scoped="scoped">

</style>
